<template>
    <div class="center">
   <table width="742" border="0" cellpadding="0" cellspacing="0" style="width:556.50pt;border-collapse:collapse;table-layout:fixed;">
   <colgroup><col width="72" span="3" style="width:54.00pt;">
   <col width="113" style="mso-width-source:userset;mso-width-alt:3616;">
   <col width="72" span="2" style="width:54.00pt;">
   <col width="95" style="mso-width-source:userset;mso-width-alt:3040;">
   <col width="174" style="mso-width-source:userset;mso-width-alt:5568;">
   </colgroup><tbody><tr height="19" style="height:14.25pt;">
    <td class="xl65" height="38" width="473" colspan="6" rowspan="2" style="height:28.50pt;width:354.75pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;text-align:center;" x:str="">电气倒闸操作后应完成的工作票</td>
    <td class="xl65" width="269" colspan="2" rowspan="2" style="width:201.75pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
   </tr><tr height="19" style="height:14.25pt;">
    <td class="xl66" height="19" colspan="4" style="height:14.25pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;"></td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">操作票编号</td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;">{{this.aa.ticketId}}</td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl69" height="38" colspan="8" rowspan="2" style="height:28.50pt;border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">操作任务：{{this.aa.workDetail}}</td>
   </tr>
   <tr height="19" style="height:14.25pt;">
   </tr><tr height="19" style="height:14.25pt;">
    <td class="xl65" height="19" style="height:14.25pt;" x:str="">序号</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">内容</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">落实情况</td>
    <td class="xl65" x:str="">备注</td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">1</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">登记地线（地刀）卡</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify1}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify1" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">2</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">等级绝缘值</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify2}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify2" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">3</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">核对五防机、监控机系统图</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify3}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify3" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">4</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">登记保护投退操作记录</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify4}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify4" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">5</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">拆除的接地线放回原存放地点</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify5}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify5" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">6</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">摘下的安全标志牌放回原存放地点</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify6}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify6" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">7</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">使用的安全工具器具放回原存放地点</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify7}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify7" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="45.33" style="height:34.00pt;mso-height-source:userset;mso-height-alt:680;">
    <td class="xl70" height="45.33" align="right" style="height:34.00pt;" x:num="">8</td>
    <td class="xl71" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">未用完的备品、备件（保险）放回<br>原存放地点</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify8}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify8" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">9</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">如实做操作记录</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify9}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify9" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">10</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">向厂长、值长或班长汇报</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify10}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify10" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">11</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">操作录音文件保存</td>
   <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify11}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify11" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">12</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">班组长对照录音对操作过程进行检查</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify12}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify12" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" align="right" style="height:14.25pt;" x:num="">13</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" x:str="">其他</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.ifVerify13}}</td>
    <td class="xl65" colspan="3" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
         <j-dict-select-tag v-model="ifVerify13" dictCode="opr_tic"  style="width:190px;"/>
    </td>
    <td class="xl70"></td>
   </tr>
   <tr height="19" style="height:14.25pt;">
    <td class="xl70" height="19" style="height:14.25pt;" x:str="">操作人</td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!draft">{{this.aa.doPerson}}</td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="draft">
        <a-input v-model="doPerson"></a-input>
    </td>
    <td class="xl70" x:str="">监护人</td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="!guar">{{this.aa.protectPerson}}</td>
    <td class="xl65" colspan="2" style="border-right:.5pt solid windowtext;border-bottom:.5pt solid windowtext;" v-if="guar">
        <a-input v-model="protectPerson"></a-input>
    </td>
    <td class="xl70" x:str="">时间</td>
    <td class="xl70" v-if="!guar">{{this.aa.overDate}}</td>
    <td class="xl70" v-if="guar">
        <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择时间" class="query-group-cust" v-model="overDate"></j-date>
    </td>
   </tr>
   <!--[if supportMisalignedColumns]-->
    <tr width="0" style="display:none;">
     <td width="113" style="width:85;"></td>
     <td width="95" style="width:71;"></td>
     <td width="174" style="width:131;"></td>
    </tr>
   <!--[endif]-->
  </tbody></table>
    </div>
</template>
<script>
import JDate from '@/components/jeecg/JDate.vue'
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue'
import store from '@/store'
import{Time} from '@/utils/time'
import { httpAction, getAction,postAction,putAction } from '@/api/manage'
import {getCookie,setCookie} from '@/utils/cookie'
export default {
     components: {
      JDate,
      JDictSelectTag,
    },
    data(){
        return{
            aa:{},
            draft:false,
            doPerson:store.getters.userInfo.realname,
            guar:false,
            ifVerify1:'',
            ifVerify2:'',
            ifVerify3:'',
            ifVerify4:'',
            ifVerify5:'',
            ifVerify6:'',
            ifVerify7:'',
            ifVerify8:'',
            ifVerify9:'',
            ifVerify10:'',
            ifVerify11:'',
            ifVerify12:'',
            ifVerify13:'',
            protectPerson:store.getters.userInfo.realname,
            overDate:Time(),
            judge:'',

        }
    },
    props:['bb'], 
    methods:{
        refresh(){
            return this.aa.type
        },
        back(){
            var obj = {}
            if(this.draft == true){
                obj = {
                    id:this.aa.id,
                    ticketId:this.aa.ticketId,
                    doPerson:this.doPerson,
                }
            }else if(this.guar == true){
                obj = {
                    id:this.aa.id,
                    ticketId:this.aa.ticketId,
                     ifVerify1:this.ifVerify1,
                    ifVerify2:this.ifVerify2,
                    ifVerify3:this.ifVerify3,
                    ifVerify4:this.ifVerify4,
                    ifVerify5:this.ifVerify5,
                    ifVerify6:this.ifVerify6,
                    ifVerify7:this.ifVerify7,
                    ifVerify8:this.ifVerify8,
                    ifVerify9:this.ifVerify9,
                    ifVerify10:this.ifVerify10,
                    ifVerify11:this.ifVerify11,
                    ifVerify12:this.ifVerify12,
                    ifVerify13:this.ifVerify13,
                    ifVerify14:this.ifVerify14,
                    protectPerson:this.protectPerson,
                    overDate:this.overDate,
                }
            }
             
            return obj
        },
    },
    mounted(){
          var param = {
            ticketId:this.bb.ticketId,
        }
         postAction('/eleswitch/eleSwitch/judge',param).then(res=>{
                 console.log('jieguo',res)
                 this.judge = res.result
             })

        getAction('/eleswitcheck_a/eleSwitchChecka/list',param).then(res=>{
            console.log('res',res)
            this.aa = res.result.records[0]
            console.log('aa',this.aa)
             var params={
                    userid:store.getters.userInfo.id
                }
             getAction('/sys/user/queryUserRole',params).then(res=>{
             if(this.judge == 'yes'){
                 if(res.result[0] == '1364736776864395266'){ //负责人
                    if(this.aa.doPerson == null){
                        this.draft = true
                    }
                }else if(res.result[0] == "1376346723403657218"){ //监护人
                    if(this.aa.doPerson != null && this.aa.protectPerson == null){
                            this.guar = true
                        }
                }else if(res.result[0] == '1364736688620433410'){ //值班长

                }
             }
            
            })
        })
       
    }
}
</script>
<style scoped>
td{
    padding-top: 1px;
    padding-right: 1px;
    padding-left: 1px;
    vertical-align: middle;
    white-space: nowrap;
    color: windowtext;
    font-size: 12pt;
    font-weight: 400;
    font-style: normal;
    font-family: 宋体;
    text-decoration: none;
    border: 1px solid #000;
     }
.center{
    width:742px;
     background-color: #E5EDF0 !important;
     } 

</style>